package com.example.demo;

import org.springframework.stereotype.Controller;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86187
 * Date: 2023-03-17
 * Time: 17:05
 */

@Controller
@ResponseBody
public class HelloController {
    @RequestMapping("/hello")
    public String sayHello(String name) {
        if (!StringUtils.hasLength(name)) {
            name = "提提子";
        }
        return "hello world, hello, " + name;
    }
}
